Finding the Expiration Date of a License

Customers like to know when their license would expire. You can have your application display the expiration date of the license.

This section describes the prerequisites:

NOTE   You can also use the VLSgetLicenseInfo API to find license information.

Include Libraries

Licensing library specific to your platform, including the dependent libraries specific to your environment.

Include Header File(s )

lserv.h

Declare Variables
unsigned char   *feature_name;
unsigned char   *version;
int              index=0;
VLSfeatureInfo   feature_info;
API Calls

>VLSinitialize();

>feature_info.structSz=sizeOf(feature_info);

>VLSgetFeatureInfo(feature_name, version, index, NULL, &feature_info);

>printf("License expiry date is:%s", ctime((time_t *)&(feature_info.death_day)));

NOTE   Define the pre-processor directive _USE_32BIT_TIME_T in the project properties before compiling the code snippet provided above